from dotenv import load_dotenv
load_dotenv(dotenv_path='.qwen')


# 编写获取大模型的函数
def get_qwen_models():
    from langchain_community.llms.tongyi import Tongyi
    llm = Tongyi(model="qwen-max", temperature=0.1, top_p=0.7, max_tokens=512)
    
    from langchain_community.chat_models import ChatTongyi
    chat = ChatTongyi(model="qwen-chat-7b", temperature=0.1, top_p=0.7, max_tokens=512)
    
    from langchain_community.embeddings import DashScopeEmbeddings
    embed = DashScopeEmbeddings(model="text-embedding-v3")
    
    return llm, chat, embed

